<%--                                                                       --%>
<%-- Copyright (c) 2003 BroadVision, Inc.  All rights reserved.            --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ page import = "java.util.*, java.net.*,
  com.broadvision.ssp.client.SelfServiceProcess,
  com.broadvision.ssp.client.*,
  com.broadvision.ssp.client.workflow.*,
  com.broadvision.ssp.common.*"
%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<SCRIPT language="javascript">

  // Create a dummy (timestamp) attribute to get around an IE cache problem.
  function getTimeStamp() {
    var now = new Date;
    var timestamp = '' + now.getYear() + now.getMonth() + now.getDate() + 
      now.getHours() + now.getMinutes() + now.getSeconds() + now.getMilliseconds();
    return timestamp;
  }
  
  // popup new window to find and select users/groups
  function searchUserPopup(popupUrl, parentFormName, parentFieldName) {
    var timestamp = getTimeStamp();
    if (popupUrl != null) {
      if (popupUrl.indexOf("?") < 0) {
        popupUrl += "?";
      } 
      else {
        popupUrl += "&";
      }
    }
    popupUrl += 'timestamp=' + timestamp + '&parentFormName=' + parentFormName +
      '&parentFieldName=' + parentFieldName;
    var thisForm = document.forms[parentFormName];
    var elements = thisForm.elements;
    var numElements = elements.length;
    var field = null;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == parentFieldName) {
        field = elements[elementIndex];
        break;
      }
    }
    if (field != null && field.length > 0) {
      var selectedusers = '&selected=';
      for (var i = 0; i < field.length; i++) {
        selectedusers += field.options[i].value;
        if (i != field.length - 1) {
          selectedusers += '%24%23@!';
        }
      }
      popupUrl += selectedusers;
    }
    var windowName = parentFormName + parentFieldName;
    var windowFeatures = 'width=700,height=600,scrollbars=yes,resizable=yes';
    var popupWindow = window.open(popupUrl, windowName, windowFeatures);
    if (popupWindow != null) {
      if (popupWindow.opener == null) {
        popupWindow.opener = self;
      }
    }
    popupWindow.focus();
  }
  
  // callback function
  function setSelectedUsers(formName, fieldName, users) {
    var thisForm = document.forms[formName];
    var elements = thisForm.elements;
    var numElements = elements.length;
    var field = null;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == fieldName) {
        field = elements[elementIndex];
        break;
      }
    }
    if (field != null) {
      var numOriginalUsers = field.length;
      if (users != null) {
        var numUsers = users.length;
        var i = 0;
        for (i = 0; i < numUsers; i++) {
          if (i >= numOriginalUsers) {
            var newoption = new Option(users[i], users[i], true, true);
            field.options[i] = newoption;
          }
          else {
            field.options[i].text = users[i];
            field.options[i].value = users[i];
            field.options[i].defaultSelected = true;
            field.options[i].selected = true;
          }
        }
        for (var j = numOriginalUsers - 1; j >= i; j--) {
          field.options[j] = null;
        }
      }
      else {
        for (var i = numOriginalUsers - 1; i >= 0; i--) {
          field.options[i] = null;
        }
      }
    }
  }

  // popup new window to find and select users/groups
  function searchActorPopup(popupUrl, parentFormName, parentFieldName) {
    var timestamp = getTimeStamp();
    if (popupUrl != null) {
      if (popupUrl.indexOf("?") < 0) {
        popupUrl += "?";
      } 
      else {
        popupUrl += "&";
      }
    }
    popupUrl += 'timestamp=' + timestamp + '&parentFormName=' + parentFormName +
      '&parentFieldName=' + parentFieldName + '&packageOid=' + 
      <bean:write name="processTaskAlertView" property="packageOid"/>;
    var thisForm = document.forms[parentFormName];
    var elements = thisForm.elements;
    var numElements = elements.length;
    var field = null;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == parentFieldName) {
        field = elements[elementIndex];
        break;
      }
    }
    if (field != null && field.length > 0) {
      var selectedusers = '&selected=';
      for (var i = 0; i < field.length; i++) {
        selectedusers += field.options[i].value;
        if (i != field.length - 1) {
          selectedusers += '%24%23@!';
        }
      }
      popupUrl += selectedusers;
    }
    var windowName = parentFormName + parentFieldName;
    var windowFeatures = 'width=700,height=600,scrollbars=yes,resizable=yes';
    var popupWindow = window.open(popupUrl, windowName, windowFeatures);
    if (popupWindow != null) {
      if (popupWindow.opener == null) {
        popupWindow.opener = self;
      }
    }
    popupWindow.focus();
  }
  
  // callback function
  function setSelectedActors(formName, fieldName, users) {
    var thisForm = document.forms[formName];
    var elements = thisForm.elements;
    var numElements = elements.length;
    var field = null;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == fieldName) {
        field = elements[elementIndex];
        break;
      }
    }
    if (field != null) {
      var numOriginalUsers = field.length;
      if (users != null) {
        var numUsers = users.length;
        var i = 0;
        for (i = 0; i < numUsers; i++) {
          if (i >= numOriginalUsers) {
            var newoption = new Option(users[i], users[i], true, true);
            field.options[i] = newoption;
          }
          else {
            field.options[i].text = users[i];
            field.options[i].value = users[i];
            field.options[i].defaultSelected = true;
            field.options[i].selected = true;
          }
        }
        for (var j = numOriginalUsers - 1; j >= i; j--) {
          field.options[j] = null;
        }
      }
      else {
        for (var i = numOriginalUsers - 1; i >= 0; i--) {
          field.options[i] = null;
        }
      }
    }
  }

  // popup new window to find and select users/groups
  function searchGroupPopup(popupUrl, parentFormName, parentFieldName) {
    var DELIM = '%24%23@!';
    var timestamp = getTimeStamp();
    if (popupUrl != null) {
      if (popupUrl.indexOf("?") < 0) {
        popupUrl += "?";
      } 
      else {
        popupUrl += "&";
      }
    }
    popupUrl += 'timestamp=' + timestamp + '&parentFormName=' + parentFormName +
      '&parentFieldName=' + parentFieldName;
    var thisForm = document.forms[parentFormName];
    var elements = thisForm.elements;
    var numElements = elements.length;
    var field = null;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == parentFieldName) {
        field = elements[elementIndex];
        break;
      }
    }
    if (field != null && field.length > 0) {
      var selectedgroups = '&existingGroupFQNs=';
      for (var i = 0; i < field.length; i++) {
        selectedgroups += field.options[i].value;
        if (i != field.length - 1) {
          selectedgroups += DELIM;
        }
      }
      popupUrl += selectedgroups;
    }

    popupUrl += '&callback=setNewGroups';
    popupUrl += '&minSelection=0&multiSelect=true&recursiveCheck=true';
    
    var windowName = parentFormName + parentFieldName;
    var windowFeatures = 'width=700,height=600,scrollbars=yes,resizable=yes';
    var popupWindow = window.open(popupUrl, windowName, windowFeatures);
    if (popupWindow != null) {
      if (popupWindow.opener == null) {
        popupWindow.opener = self;
      }
    }
    popupWindow.focus();
  }
  
  //
  // Call back function
  //
  function setNewGroups(ids, names) {
    document.processTaskAlertForm.groupRecipients.length = 0;
    for (var index = 0; index < ids.length; index++) {
      var option = new Option(" ");
      option.text = names[index];
      option.value = ids[index];
      option.defaultSelected = true;
      option.selected = true;
      document.processTaskAlertForm.groupRecipients.options[index] = option;
    }
  }

  // callback function
  function setSelectedGroups(formName, fieldName, groups) {
    var thisForm = document.forms[formName];
    var elements = thisForm.elements;
    var numElements = elements.length;
    var field = null;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == fieldName) {
        field = elements[elementIndex];
        break;
      }
    }
    if (field != null) {
      var numOriginalGroups = field.length;
      if (groups != null) {
        var numGroups = groups.length;
        var i = 0;
        for (i = 0; i < numGroups; i++) {
          if (i >= numOriginalGroups) {
            var newoption = new Option(groups[i], groups[i], true, true);
            field.options[i] = newoption;
          }
          else {
            field.options[i].text = groups[i];
            field.options[i].value = groups[i];
            field.options[i].defaultSelected = true;
            field.options[i].selected = true;
          }
        }
        for (var j = numOriginalGroups - 1; j >= i; j--) {
          field.options[j] = null;
        }
      }
      else {
        for (var i = numOriginalGroups - 1; i >= 0; i--) {
          field.options[i] = null;
        }
      }
    }
  }

  // popup new window to find and select users/groups
  function searchActorGroupPopup(popupUrl, parentFormName, parentFieldName) {
    var timestamp = getTimeStamp();
    if (popupUrl != null) {
      if (popupUrl.indexOf("?") < 0) {
        popupUrl += "?";
      } 
      else {
        popupUrl += "&";
      }
    }
    popupUrl += 'timestamp=' + timestamp + '&parentFormName=' + parentFormName +
      '&parentFieldName=' + parentFieldName + '&packageOid=' +
      <bean:write name="processTaskAlertView" property="packageOid"/>;
    var thisForm = document.forms[parentFormName];
    var elements = thisForm.elements;
    var numElements = elements.length;
    var field = null;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == parentFieldName) {
        field = elements[elementIndex];
        break;
      }
    }
    if (field != null && field.length > 0) {
      var selectedgroups = '&selected=';
      for (var i = 0; i < field.length; i++) {
        selectedgroups += field.options[i].value;
        if (i != field.length - 1) {
          selectedgroups += '%24%23@!';
        }
      }
      popupUrl += selectedgroups;
    }
    var windowName = parentFormName + parentFieldName;
    var windowFeatures = 'width=700,height=600,scrollbars=yes,resizable=yes';
    var popupWindow = window.open(popupUrl, windowName, windowFeatures);
    if (popupWindow != null) {
      if (popupWindow.opener == null) {
        popupWindow.opener = self;
      }
    }
    popupWindow.focus();
  }
  
  // callback function
  function setSelectedActorGroups(formName, fieldName, groups) {
    var thisForm = document.forms[formName];
    var elements = thisForm.elements;
    var numElements = elements.length;
    var field = null;
    for (var elementIndex = 0; elementIndex < numElements; elementIndex++) {
      var elementName = elements[elementIndex].name;
      if (elementName == fieldName) {
        field = elements[elementIndex];
        break;
      }
    }
    if (field != null) {
      var numOriginalGroups = field.length;
      if (groups != null) {
        var numGroups = groups.length;
        var i = 0;
        for (i = 0; i < numGroups; i++) {
          if (i >= numOriginalGroups) {
            var newoption = new Option(groups[i], groups[i], true, true);
            field.options[i] = newoption;
          }
          else {
            field.options[i].text = groups[i];
            field.options[i].value = groups[i];
            field.options[i].defaultSelected = true;
            field.options[i].selected = true;
          }
        }
        for (var j = numOriginalGroups - 1; j >= i; j--) {
          field.options[j] = null;
        }
      }
      else {
        for (var i = numOriginalGroups - 1; i >= 0; i--) {
          field.options[i] = null;
        }
      }
    }
  }

  function doReset(myform) {
    myform.action = '<html:rewrite page="/bp/processTaskAlertEdit.do"/>';
    myform.submit();
  }

  function doCancel(myform) {
    myform.action = '<html:rewrite page="/bp/processTaskAlertView.do"/>';
    myform.submit();
  }

  function doSave(myform) {
    if ('0' == '<bean:write name="processTaskAlertForm" property="alertType"/>') {
      if (myform.noticeTimeDays.value == 0 && myform.noticeTimeHours.value == 0) {
        alert('<bean:message key="bp.process.error.invalidNoticeTime" bundle="bp.messages"/>');
        return;
      }
      if (validateProcessTaskAlertForm(myform) == false) {
        return;
      }
    }
    // check if no receipients are selected
    var checkSendToPerformer = false;
    if (myform.sendToPerformer != null && myform.sendToPerformer.checked == true) {
      checkSendToPerformer = true;
    }
    if (checkSendToPerformer == false && myform.sendToManager.checked == false &&
      myform.userRecipients.length == 0 &&
      myform.groupRecipients.length == 0 &&
      myform.participantUserRecipients.length == 0 &&
      myform.participantGroupRecipients.length == 0) {
      alert('<bean:message key="bp.process.error.emptyAlertRecipient" bundle="bp.messages"/>');
      return;
    }
    myform.forwardAction.value="/bp/processTaskAlertView.do";
    myform.action = '<html:rewrite page="/bp/processTaskAlertEditSave.do"/>';
    myform.submit();
  }

  function checkNumberOnly(e) {
    var charCode = (navigator.appName == "Netscape") ? e.which : e.keyCode;
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
      return false;
    }
    else {
      return true;
    }
  }

</SCRIPT>

<% 
  java.util.HashMap map = new java.util.HashMap();
  String procOid = request.getParameter("processOid"); 
  String taskNumber = request.getParameter("number"); 
  if (procOid != null && procOid.length() > 0 && taskNumber != null && taskNumber.length() > 0) {
    map.put("processOid", procOid);
    map.put("number", taskNumber);
  }
  else {
    map.put("processOid", "-1");
    map.put("number", "-1");
  }
  pageContext.setAttribute("pagetabParam", map, PageContext.PAGE_SCOPE);
%>

<html:javascript formName="processTaskAlertForm"/>
<html:form action="/bp/processTaskAlertEditSave.do">
<html:hidden name="processTaskAlertForm" property="processOid"/>
<html:hidden name="processTaskAlertForm" property="number"/>
<html:hidden name="processTaskAlertForm" property="alertType"/>
<html:hidden name="processTaskAlertForm" property="exist"/>
<input type="hidden" name="forwardAction"/>
<table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="content area">
  <tr>
    <td valign="top" width="100%">
      <div class="pageTitle"><bean:write name="processTaskAlertView" property="processName"/></div>
      <div class="errorMessage"><html:errors bundle="bp.messages"/></div>
      <%@include file="/mc/common/pagetab.jsp" %>
      <div class="breadcrumb">
        <logic:present name="processSubprocessPath" scope="session">
          <logic:greaterThan name="processSubprocessPath" property="processOid" value="0">
            <bean:write name="processSubprocessPath" property="processName"/>
            <logic:iterate id="subprocess" name="processSubprocessPath" property="subprocesses" indexId="i">
              &nbsp;<bean:message key="bp.process.taskSeparator" bundle="bp.messages"/>&nbsp;
              <bean:write name="subprocess" property="number"/>:
              <bean:write name="subprocess" property="friendlyName"/>
              &nbsp;<bean:message key="bp.process.taskSeparator" bundle="bp.messages"/>&nbsp;
              <bean:write name="subprocess" property="subprocessName"/>
            </logic:iterate>
          </logic:greaterThan>
        </logic:present>
        <logic:present name="processSubprocessPath" scope="session">
          <logic:equal name="processSubprocessPath" property="processOid" value="0">
            <bean:write name="processTaskAlertView" property="processName"/>
          </logic:equal>
        </logic:present>
        <logic:notPresent name="processSubprocessPath" scope="session">
          <bean:write name="processTaskAlertView" property="processName"/>
        </logic:notPresent>
        &nbsp;<bean:message key="bp.process.taskSeparator" bundle="bp.messages"/>&nbsp;
        <bean:write name="processTaskAlertForm" property="number"/>:
        <bean:write name="processTaskAlertView" property="friendlyName"/>
      </div>
      <div class="pageSubtitle">
        <span class="left"><bean:message key="bp.process.processTaskAlert.alertDetails" bundle="bp.messages"/></span>
        <span class="right">&nbsp;</span>
      </div>
      <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="Process summary">
        <tr> 
          <td class="label" width="30%"><bean:message key="bp.process.processTaskAlert.alertType" bundle="bp.messages"/></td>
          <td class="labelField" width="70%">
            <logic:equal name="processTaskAlertForm" property="alertType" value="0">
              <bean:message key="bp.process.processTaskAlert.alertType.reminder" bundle="bp.messages"/>
            </logic:equal>
            <logic:equal name="processTaskAlertForm" property="alertType" value="1">
              <bean:message key="bp.process.processTaskAlert.alertType.taskCompletion" bundle="bp.messages"/>
            </logic:equal>
            <logic:equal name="processTaskAlertForm" property="alertType" value="2">
              <bean:message key="bp.process.processTaskAlert.alertType.taskAvailable" bundle="bp.messages"/>
            </logic:equal>
            <logic:equal name="processTaskAlertForm" property="alertType" value="3">
              <bean:message key="bp.process.processTaskAlert.alertType.taskAssignment" bundle="bp.messages"/>
            </logic:equal>
            <logic:equal name="processTaskAlertForm" property="alertType" value="5">
              <bean:message key="bp.process.processTaskAlert.alertType.overdue" bundle="bp.messages"/>
            </logic:equal>
          </td>
        </tr>
        <tr> 
          <td class="label" width="30%"><bean:message key="bp.process.processTaskAlert.deliveryType" bundle="bp.messages"/></td>
          <td class="labelField" width="70%">
            <html:radio name="processTaskAlertForm" property="deliveryType" value="1"/>
            <bean:message key="bp.process.processTaskAlert.deliveryType.email" bundle="bp.messages"/>
            &nbsp;
            <html:radio name="processTaskAlertForm" property="deliveryType" value="0"/>
            <bean:message key="bp.process.processTaskAlert.deliveryType.inbox" bundle="bp.messages"/>
          </td>
        </tr>
        <logic:equal name="processTaskAlertForm" property="exist" value="true">
          <tr> 
            <td class="label" width="30%"><bean:message key="bp.process.processTaskAlert.status" bundle="bp.messages"/></td>
            <td class="labelField" width="70%">
              <html:radio name="processTaskAlertForm" property="enabled" value="true"/>
              <bean:message key="bp.process.processTaskAlert.status.enabled" bundle="bp.messages"/>
              &nbsp;
              <html:radio name="processTaskAlertForm" property="enabled" value="false"/>
              <bean:message key="bp.process.processTaskAlert.status.disabled" bundle="bp.messages"/>
            </td>
          </tr>
        </logic:equal>
        <tr> 
          <td class="label" width="30%"><bean:message key="bp.process.processTaskAlert.sendTo" bundle="bp.messages"/></td>
          <td class="labelField" width="70%">
            <html:checkbox name="processTaskAlertForm" property="sendToManager"/>
            <bean:message key="bp.process.processTaskAlert.sendTo.manager" bundle="bp.messages"/>
            <logic:equal name="processTaskAlertForm" property="alertType" value="1">
              <logic:notEqual name="processTaskAlertView" property="type" value="1">
                <logic:notEqual name="processTaskAlertView" property="type" value="6">
                  <logic:notEqual name="processTaskAlertView" property="type" value="10">
                    <br>
                    <html:checkbox name="processTaskAlertForm" property="sendToPerformer"/>
                    <bean:message key="bp.process.processTaskAlert.sendTo.performer" bundle="bp.messages"/>
                  </logic:notEqual>
                </logic:notEqual>
              </logic:notEqual>
            </logic:equal>
            <logic:notEqual name="processTaskAlertForm" property="alertType" value="1">
              <logic:equal name="processTaskAlertForm" property="alertType" value="5">
                <logic:notEqual name="processTaskAlertView" property="type" value="1">
                  <logic:notEqual name="processTaskAlertView" property="type" value="6">
                    <logic:notEqual name="processTaskAlertView" property="type" value="10">
                      <br>
                      <html:checkbox name="processTaskAlertForm" property="sendToPerformer"/>
                      <bean:message key="bp.process.processTaskAlert.sendTo.performer" bundle="bp.messages"/>
                    </logic:notEqual>
                  </logic:notEqual>
                </logic:notEqual>
              </logic:equal>
              <logic:notEqual name="processTaskAlertForm" property="alertType" value="5">
                <br>
                <html:checkbox name="processTaskAlertForm" property="sendToPerformer"/>
                <bean:message key="bp.process.processTaskAlert.sendTo.performer" bundle="bp.messages"/>
              </logic:notEqual>
            </logic:notEqual>
          </td>
        </tr>
        <logic:equal name="processTaskAlertForm" property="alertType" value="0">
          <tr> 
            <td class="label" width="30%">
              <bean:message key="bp.process.processTaskAlert.noticeTime" bundle="bp.messages"/>
            </td>
            <td class="labelField" width="70%">
              <html:text name="processTaskAlertForm" property="noticeTimeDays" size="5" maxlength="5" onkeypress="return checkNumberOnly(event)"/>
              <bean:message key="bp.process.unit.days" bundle="bp.messages"/>
              &nbsp;
              <html:text name="processTaskAlertForm" property="noticeTimeHours" size="2" maxlength="2" onkeypress="return checkNumberOnly(event)"/>
              <bean:message key="bp.process.unit.hours" bundle="bp.messages"/>
            </td>
          </tr>
        </logic:equal>
      </table>
      <div class="pageSubtitle">
        <span class="left"><bean:message key="bp.process.processTaskAlert.additionalRecipients" bundle="bp.messages"/></span>
        <span class="right">&nbsp;</span>
      </div>
      <table class="labelForm" width="100%" border="0" cellspacing="0" cellpadding="0" summary="Process summary">
        <tr> 
          <td class="label" width="30%"><bean:message key="bp.process.processTaskAlert.alertUsers" bundle="bp.messages"/></td>
          <td class="labelField" width="70%" valign="top">
            <html:select name="processTaskAlertForm" property="userRecipients" size="4" multiple="true">
              <html:optionsCollection name="processTaskAlertView" property="userRecipientsList"/>
            </html:select>
            <input type="button" name="browseUsers" class="pageButton" 
              onClick="JavaScript:searchUserPopup('<html:rewrite page="/mt/userMultiSearchPopup.do"/>','processTaskAlertForm','userRecipients');" value='<bean:message key="button.browse" bundle="bp.messages"/>' align="top">
          </td>
        </tr>
        <tr> 
          <td class="label" width="30%"><bean:message key="bp.process.processTaskAlert.alertParticipantUsers" bundle="bp.messages"/></td>
          <td class="labelField" width="70%" valign="top">
            <html:select name="processTaskAlertForm" property="participantUserRecipients" size="4" multiple="true">
              <html:optionsCollection name="processTaskAlertView" property="participantUserRecipientsList"/>
            </html:select>
            <input type="button" name="browseUserActors" class="pageButton"
              onClick="JavaScript:searchActorPopup('<html:rewrite page="/bp/actorMultiSearchPopup.do"/>','processTaskAlertForm','participantUserRecipients');" value='<bean:message key="button.browse" bundle="bp.messages"/>' align="top">
          </td>
        </tr>
        <tr> 
          <td class="label" width="30%"><bean:message key="bp.process.processTaskAlert.alertGroups" bundle="bp.messages"/></td>
          <td class="labelField" width="70%">
            <html:select name="processTaskAlertForm" property="groupRecipients" size="4" multiple="true">
              <html:optionsCollection name="processTaskAlertView" property="groupRecipientsList"/>
            </html:select>
            <input type="button" name="browseGroups" class="pageButton"
              onClick="JavaScript:searchGroupPopup('<html:rewrite page="/mt/groupMultiPopup.do"/>','processTaskAlertForm','groupRecipients');" value='<bean:message key="button.browse" bundle="bp.messages"/>' align="top">
          </td>
        </tr>
        <tr> 
          <td class="label" width="30%"><bean:message key="bp.process.processTaskAlert.alertParticipantGroups" bundle="bp.messages"/></td>
          <td class="labelField" width="70%">
            <html:select name="processTaskAlertForm" property="participantGroupRecipients" size="4" multiple="true">
              <html:optionsCollection name="processTaskAlertView" property="participantGroupRecipientsList"/>
            </html:select>
            <input type="button" name="browseGroupActors" class="pageButton"
              onClick="JavaScript:searchActorGroupPopup('<html:rewrite page="/bp/actorGroupMultiSearchPopup.do"/>','processTaskAlertForm','participantGroupRecipients');" value='<bean:message key="button.browse" bundle="bp.messages"/>' align="top">
          </td>
        </tr>
      </table>
      <div class="pageButtonWrap" align="right">
        <input type="button" name="resetData" class="pageButton" 
          onClick="doReset(this.form);" 
          value='<bean:message key="button.reset" bundle="bp.messages"/>'>
        &nbsp;
        <input type="button" name="cancelData" class="pageButton" 
          onClick="doCancel(this.form);" 
          value='<bean:message key="button.cancel" bundle="bp.messages"/>'>
        <input type="button" name="saveData" class="pageButton" 
          onClick="doSave(this.form);" 
          value='<bean:message key="button.save" bundle="bp.messages"/>'>
      </div>
    </td>
  </tr>
</table>
</html:form>
